<ion-view view-title="我的货源" hide-tabs>
  <ion-nav-title>
    我的货源
  </ion-nav-title>
  <ion-content class="has-header">

    <div class="isLoading" ng-if="cargoList.showloading">
      <ion-spinner icon="ios" ></ion-spinner>
      <div>正在加载中&nbsp;</div>
    </div>
    <!--<div class="list" ng-if="!showloading">-->
    <div class="list cargo_list" ng-if="!cargoList.showloading">
      <div class="item card" ng-repeat="cargo in cargoList.cargos">
        <div class="row">
          <div class="col">
            <span>编号：{{cargo._id}}</span>
            <span class="assertive" ng-if="!cargo.ifTrade">(未交易)</span>
            <span class="positive" ng-if="cargo.ifTrade">(已交易)</span>
          </div>
        </div>
        <div class="row">
          <div class="col"><span class="add_def">装货地：</span>{{cargo.from}}</div>
        </div>
        <div class="row">
          <div class="col"><span class="add_def">卸货地：</span>{{cargo.to}}</div>
        </div>
        <div class="row">
          <div class="col col-28"><span class="add_def">货品：</span>{{cargo.name}}</div>
          <div class="col col-30"><span class="add_def">重量：</span>{{cargo.load}}吨</div>
          <div class="col col-42"><span class="add_def">时间：</span>{{cargo.dateTime}}</div>
        </div>
        <div class="row">
          <div class="col col-28"><span class="add_def">车长：</span>{{cargo.lorryLength}}米</div>
          <div class="col col-30"><span class="add_def">车型：</span>{{cargo.lorryType}}</div>
          <div class="col col-42"><span class="add_def">备注：</span>{{cargo.text}}</div>
        </div>
          <!--<div class="row">-->
            <!--<div class="col color-orange">-->
              <!--<span class="add_def">估计里程：</span>{{}}-->
            <!--</div>-->
          <!--</div>-->
          <div class="row">
            <div class="col color-orange">
              <span class="add_def">费用：</span>{{cargo.price | currency:'￥'}}元
            </div>
          </div>
        <div class="flex_row_reverse">
          <button class="button button-assertive" ng-if="!cargo.ifTrade" ng-click="cargoList.del(cargo._id)">删除货源</button>
        </div>
    </div>
    </div>
  </ion-content>
  <!-- ion-content end -->
</ion-view>
